﻿#ifndef CYLINDERSPEED_H
#define CYLINDERSPEED_H

#include <QObject>
#include <QElapsedTimer>

class cylinderspeed : public QObject//使用信号槽相关机制
{
    Q_OBJECT
public:
    cylinderspeed(QObject* parent = nullptr);    //前者表示手动管理和释放资源
    ~cylinderspeed();

public slots:
    void slotSpeedInfoHandle(int deviceID, const QByteArray& data);

signals:
    void sigSpeedvalue(double velocity);

private:
    QThread* subThread;
    QElapsedTimer timer;

};

#endif // CYLINDERSPEED_H
